﻿using System;
using System.Collections.Generic;

namespace Shuba.Business
{
    public class ChannelMapping
    {
        private Shuba.Data.ChannelMapping _channelMapping;

        public ChannelMapping()
        { 
            _channelMapping = new Shuba.Data.ChannelMapping();
        }

        public List<Shuba.Model.ChannelMappingInfo> GetList(string ChannelName)
        {
            return _channelMapping.GetList(ChannelName);
        }

        public Shuba.Model.ChannelMappingInfo Get(string CHANNEL_ID, string PROSPECT_TYPE, string DEBTOR_TYPE)
        {
            return _channelMapping.Get(CHANNEL_ID, PROSPECT_TYPE, DEBTOR_TYPE);
        }

        public int Save(Shuba.Model.ChannelMappingInfo bi)
        {
            return _channelMapping.Save(bi);
        }

        public List<Shuba.Model.ChannelMappingInfo> GetListApproval(string UpdateBy)
        {
            return _channelMapping.GetListApproval(UpdateBy);
        }

        public Shuba.Model.ChannelMappingInfo GetApprovalByID(string CHANNEL_ID, string PROSPECT_TYPE, string DEBTOR_TYPE)
        {
            return _channelMapping.GetApprovalByID(CHANNEL_ID, PROSPECT_TYPE, DEBTOR_TYPE);
        }

        public int Approve(string ActType, string ChannelID, string PrspctType, string DbtrType)
        {
            return _channelMapping.Approve(ActType, ChannelID, PrspctType, DbtrType);
        }

        public void Reject(string CHANNEL_ID, string PROSPECT_TYPE, string DEBTOR_TYPE)
        {
            _channelMapping.Reject(CHANNEL_ID, PROSPECT_TYPE, DEBTOR_TYPE);
        }

        public static bool CheckExistingCombination(string ChannelID, string ProspectType, string DebtorType)
        {
            return Shuba.Data.ChannelMapping.CheckExistingCombination(ChannelID, ProspectType, DebtorType);
        }

        public static bool CheckExistingCombination2(string ChannelID, string ProspectType, string DebtorType)
        {
            return Shuba.Data.ChannelMapping.CheckExistingCombination2(ChannelID, ProspectType, DebtorType);
        }

        public static bool CheckCombinationExternalMapping(string EXTERNAL_ID, string CHANNEL_ID)
        {
            return Shuba.Data.ChannelMapping.CheckCombinationExternalMapping(EXTERNAL_ID, CHANNEL_ID);
        }

        public static bool CheckExistingCombinationForUpload(string crcCode, string ChannelID, string ProspectType, string DebtorType)
        {
            return Shuba.Data.ChannelMapping.CheckExistingCombinationForUpload(crcCode, ChannelID, ProspectType, DebtorType);
        }

        public static bool CheckIsUsedPRN(string CHANNEL_ID, string PROSPECT_TYPE, string DEBTOR_TYPE)
        {
            return Shuba.Data.ChannelMapping.CheckIsUsedPRN(CHANNEL_ID, PROSPECT_TYPE, DEBTOR_TYPE);
        }

        public bool CekExistingChannelDebtorProspectType(string CHANNEL_ID, string PROSPECT_TYPE, string DEBTOR_TYPE)
        {
            return _channelMapping.CekExistingChannelDebtorProspectType(CHANNEL_ID, PROSPECT_TYPE, DEBTOR_TYPE);
        }
    }
}
